package com.docker.drug.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.docker.drug.domain.DoctorWarehousing;
import com.docker.drug.mapper.DoctorDrugWarehousingIntermediateMapper;
import com.docker.drug.domain.DoctorDrugWarehousingIntermediate;
import com.docker.drug.mapper.DoctorWarehousingMapper;
import com.docker.drug.service.IDoctorDrugWarehousingIntermediateService;

/**
 * 药品入库和药品中间Service业务层处理
 * 
 * @author lin
 * @date 2025-04-10
 */
@Service
public class DoctorDrugWarehousingIntermediateServiceImpl implements IDoctorDrugWarehousingIntermediateService 
{
    @Autowired
    private DoctorDrugWarehousingIntermediateMapper doctorDrugWarehousingIntermediateMapper;


    @Override
    public List<DoctorDrugWarehousingIntermediate> selectDrugCode(String drugCode) {
        List<DoctorDrugWarehousingIntermediate> list = doctorDrugWarehousingIntermediateMapper.selectDrugCode(drugCode);

        return list;
    }

    @Override
    public List<DoctorDrugWarehousingIntermediate> selectWarehousingOrderId(String warehousingOrderId) {

        return  doctorDrugWarehousingIntermediateMapper.selectWarehousingOrderId(warehousingOrderId);
    }

    /**
     * 查询药品入库和药品中间
     * 
     * @param id 药品入库和药品中间主键
     * @return 药品入库和药品中间
     */
    @Override
    public DoctorDrugWarehousingIntermediate selectDoctorDrugWarehousingIntermediateById(Long id)
    {
        return doctorDrugWarehousingIntermediateMapper.selectDoctorDrugWarehousingIntermediateById(id);
    }

    /**
     * 查询药品入库和药品中间列表
     * 
     * @param doctorDrugWarehousingIntermediate 药品入库和药品中间
     * @return 药品入库和药品中间
     */
    @Override
    public List<DoctorDrugWarehousingIntermediate> selectDoctorDrugWarehousingIntermediateList(DoctorDrugWarehousingIntermediate doctorDrugWarehousingIntermediate)
    {
        return doctorDrugWarehousingIntermediateMapper.selectDoctorDrugWarehousingIntermediateList(doctorDrugWarehousingIntermediate);
    }

    /**
     * 新增药品入库和药品中间
     * 
     * @param doctorDrugWarehousingIntermediate 药品入库和药品中间
     * @return 结果
     */
    @Override
    public int insertDoctorDrugWarehousingIntermediate(DoctorDrugWarehousingIntermediate doctorDrugWarehousingIntermediate)
    {
        return doctorDrugWarehousingIntermediateMapper.insertDoctorDrugWarehousingIntermediate(doctorDrugWarehousingIntermediate);
    }

    /**
     * 修改药品入库和药品中间
     * 
     * @param doctorDrugWarehousingIntermediate 药品入库和药品中间
     * @return 结果
     */
    @Override
    public int updateDoctorDrugWarehousingIntermediate(DoctorDrugWarehousingIntermediate doctorDrugWarehousingIntermediate)
    {
        return doctorDrugWarehousingIntermediateMapper.updateDoctorDrugWarehousingIntermediate(doctorDrugWarehousingIntermediate);
    }

    /**
     * 批量删除药品入库和药品中间
     * 
     * @param ids 需要删除的药品入库和药品中间主键
     * @return 结果
     */
    @Override
    public int deleteDoctorDrugWarehousingIntermediateByIds(Long[] ids)
    {
        return doctorDrugWarehousingIntermediateMapper.deleteDoctorDrugWarehousingIntermediateByIds(ids);
    }

    /**
     * 删除药品入库和药品中间信息
     * 
     * @param id 药品入库和药品中间主键
     * @return 结果
     */
    @Override
    public int deleteDoctorDrugWarehousingIntermediateById(Long id)
    {
        return doctorDrugWarehousingIntermediateMapper.deleteDoctorDrugWarehousingIntermediateById(id);
    }
}
